package com.myproject.mall.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@TableName("scmall_collection")
@Schema(description = "收藏")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Collection {

    @Schema(description = "收藏ID")
    @TableId(value = "collection_id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "用户ID")
    @TableId(value = "collection_user_id")
    private String userId;

    @Schema(description = "商品ID")
    @TableId(value = "collection_goods_id")
    private Long goodsId;

    @Schema(description = "收藏组ID")
    @TableId(value = "collection_group_id")
    private Integer groupId;

    @Schema(description = "收藏时间")
    @TableId(value = "collection_create_time")
    private LocalDateTime createTime;

}
